Optimal. Leaf size=169 \[ -\frac {e^3 (e \tan (c+d x))^{m-3} \, _2F_1\left (1,\frac {m-3}{2};\frac {m-1}{2};-\tan ^2(c+d x)\right )}{a^2 d (3-m)}+\frac {2 e^3 \sec (c+d x) \cos ^2(c+d x)^{\frac {m-2}{2}} (e \tan (c+d x))^{m-3} \, _2F_1\left (\frac {m-3}{2},\frac {m-2}{2};\frac {m-1}{2};\sin ^2(c+d x)\right )}{a^2 d (3-m)}-\frac {e^3 (e \tan (c+d x))^{m-3}}{a^2 d (3-m)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.27, antiderivative size = 169, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {3888, 3886, 3476, 364, 2617, 2607, 32} \[ -\frac {e^3 (e \tan (c+d x))^{m-3} \, _2F_1\left (1,\frac {m-3}{2};\frac {m-1}{2};-\tan ^2(c+d x)\right )}{a^2 d (3-m)}+\frac {2 e^3 \sec (c+d x) \cos ^2(c+d x)^{\frac {m-2}{2}} (e \tan (c+d x))^{m-3} \, _2F_1\left (\frac {m-3}{2},\frac {m-2}{2};\frac {m-1}{2};\sin ^2(c+d x)\right )}{a^2 d (3-m)}-\frac {e^3 (e \tan (c+d x))^{m-3}}{a^2 d (3-m)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 32
Rule 364
Rule 2607
Rule 2617
Rule 3476
Rule 3886
Rule 3888
Rubi steps
\begin {align*} \int \frac {(e \tan (c+d x))^m}{(a+a \sec (c+d x))^2} \, dx &=\frac {e^4 \int (-a+a \sec (c+d x))^2 (e \tan (c+d x))^{-4+m} \, dx}{a^4}\\ &=\frac {e^4 \int \left (a^2 (e \tan (c+d x))^{-4+m}-2 a^2 \sec (c+d x) (e \tan (c+d x))^{-4+m}+a^2 \sec ^2(c+d x) (e \tan (c+d x))^{-4+m}\right ) \, dx}{a^4}\\ &=\frac {e^4 \int (e \tan (c+d x))^{-4+m} \, dx}{a^2}+\frac {e^4 \int \sec ^2(c+d x) (e \tan (c+d x))^{-4+m} \, dx}{a^2}-\frac {\left (2 e^4\right ) \int \sec (c+d x) (e \tan (c+d x))^{-4+m} \, dx}{a^2}\\ &=\frac {2 e^3 \cos ^2(c+d x)^{\frac {1}{2} (-2+m)} \, _2F_1\left (\frac {1}{2} (-3+m),\frac {1}{2} (-2+m);\frac {1}{2} (-1+m);\sin ^2(c+d x)\right ) \sec (c+d x) (e \tan (c+d x))^{-3+m}}{a^2 d (3-m)}+\frac {e^4 \operatorname {Subst}\left (\int (e x)^{-4+m} \, dx,x,\tan (c+d x)\right )}{a^2 d}+\frac {e^5 \operatorname {Subst}\left (\int \frac {x^{-4+m}}{e^2+x^2} \, dx,x,e \tan (c+d x)\right )}{a^2 d}\\ &=-\frac {e^3 (e \tan (c+d x))^{-3+m}}{a^2 d (3-m)}-\frac {e^3 \, _2F_1\left (1,\frac {1}{2} (-3+m);\frac {1}{2} (-1+m);-\tan ^2(c+d x)\right ) (e \tan (c+d x))^{-3+m}}{a^2 d (3-m)}+\frac {2 e^3 \cos ^2(c+d x)^{\frac {1}{2} (-2+m)} \, _2F_1\left (\frac {1}{2} (-3+m),\frac {1}{2} (-2+m);\frac {1}{2} (-1+m);\sin ^2(c+d x)\right ) \sec (c+d x) (e \tan (c+d x))^{-3+m}}{a^2 d (3-m)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 6.92, size = 329, normalized size = 1.95 \[ \frac {\tan \left (\frac {1}{2} (c+d x)\right ) (e \tan (c+d x))^m \left ((m+1) \tan ^2\left (\frac {1}{2} (c+d x)\right ) \, _2F_1\left (m,\frac {m+3}{2};\frac {m+5}{2};\tan ^2\left (\frac {1}{2} (c+d x)\right )\right )-3 (m+3) \, _2F_1\left (m,\frac {m+1}{2};\frac {m+3}{2};\tan ^2\left (\frac {1}{2} (c+d x)\right )\right )\right ) \left (\cos (c+d x) \sec ^2\left (\frac {1}{2} (c+d x)\right )\right )^m}{2 a^2 d (m+1) (m+3)}+\frac {i 2^{1-m} \left (-\frac {i \left (-1+e^{2 i (c+d x)}\right )}{1+e^{2 i (c+d x)}}\right )^m \cos ^4\left (\frac {c}{2}+\frac {d x}{2}\right ) \sec ^2(c+d x) \left (2^m \, _2F_1\left (1,m;m+1;-\frac {-1+e^{2 i (c+d x)}}{1+e^{2 i (c+d x)}}\right )-\left (1+e^{2 i (c+d x)}\right )^m \, _2F_1\left (m,m;m+1;\frac {1}{2} \left (1-e^{2 i (c+d x)}\right )\right )\right ) \tan ^{-m}(c+d x) (e \tan (c+d x))^m}{d m (a \sec (c+d x)+a)^2} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.47, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {\left (e \tan \left (d x + c\right )\right )^{m}}{a^{2} \sec \left (d x + c\right )^{2} + 2 \, a^{2} \sec \left (d x + c\right ) + a^{2}}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (e \tan \left (d x + c\right )\right )^{m}}{{\left (a \sec \left (d x + c\right ) + a\right )}^{2}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 1.72, size = 0, normalized size = 0.00 \[ \int \frac {\left (e \tan \left (d x +c \right )\right )^{m}}{\left (a +a \sec \left (d x +c \right )\right )^{2}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (e \tan \left (d x + c\right )\right )^{m}}{{\left (a \sec \left (d x + c\right ) + a\right )}^{2}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {{\cos \left (c+d\,x\right )}^2\,{\left (e\,\mathrm {tan}\left (c+d\,x\right )\right )}^m}{a^2\,{\left (\cos \left (c+d\,x\right )+1\right )}^2} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {\left (e \tan {\left (c + d x \right )}\right )^{m}}{\sec ^{2}{\left (c + d x \right )} + 2 \sec {\left (c + d x \right )} + 1}\, dx}{a^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________